﻿// <copyright file="XmlDSig.cs" company="SharpSTS">
// Copyright (c) 2007, 2008 All Right Reserved, http://sharpsts.com/
//
// This source is subject to the Microsoft Permissive License.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Barry Dorrans</author>
// <email>barryd@idunno.org</email>
// <date>2008-06-20</date>
// <summary>Holds Xml Digital Signature constants.</summary>

namespace SharpSTS.Constants
{
    /// <summary>
    /// Holds Xml Digital Signature constants.
    /// </summary>
    internal static class XmlDSig
    {
        /// <summary>
        /// Holds constants for the KeyInfo element.
        /// </summary>
        internal static class KeyInfo
        {
            /// <summary>
            /// Holds constants for the X509Data element
            /// </summary>
            internal static class X509Data
            {
                /// <summary>
                /// Holds element names.
                /// </summary>
                internal static class Elements
                {
                    /// <summary>
                    /// This element holds the X509 certificate, encoded as text.
                    /// </summary>
                    public const string X509Certificate = "X509Certificate";                    
                }
            }

            /// <summary>
            /// Holds element names.
            /// </summary>
            internal static class Elements
            {
                /// <summary>
                /// This element conatins the X509 data for the signing certificate.
                /// </summary>
                public const string X509Data = "X509Data";
            }
        }

        /// <summary>
        /// Holds namespace constants.
        /// </summary>
        internal static class Namespace
        {
            /// <summary>
            /// The Namespace URI.
            /// </summary>
            public const string Uri = "http://www.w3.org/2000/09/xmldsig#";

            /// <summary>
            /// The namespace prefix.
            /// </summary>            
            public const string Prefix = "dsig";
        }

        /// <summary>
        /// Holds the strings to identify the signature algorithm used.
        /// </summary>
        internal static class Algorithms
        {
            /// <summary>
            /// Indicates the signature algorithm used is SHA1
            /// </summary>
            public const string RsaSha1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
        }

        /// <summary>
        /// Holds the strings to identify the schema used.
        /// </summary>
        internal static class Schema
        {
            /// <summary>
            /// The public URI of the XML Digital Signature schema.
            /// </summary>
            public const string PublicUri = "http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd";
        }

        /// <summary>
        /// Holds element names.
        /// </summary>
        internal static class Elements
        {
            /// <summary>
            /// This element holds optional key information needed to verify the signature.
            /// </summary>
            public const string KeyInfo = "KeyInfo";
        }
    }
}
